<template>
  <div>
    <el-table
      :data="allUserTable"
      highlight-current-row
      @current-change="handleCurrentChange"
      style="width: 100%">
      <el-table-column
        prop="UserID"
        label="序号"
        width="180">
      </el-table-column>
      <el-table-column
        prop="UserName"
        label="账户"
        width="180">
      </el-table-column>
      <el-table-column
        prop="RealName"
        label="姓名">
      </el-table-column>
    </el-table>
  </div>
</template>

  <script>
    export default {
      props:{
        allUserTable:{
          type:Array
        }
      },
      data() {
        return {

        }
      },
      methods:{
        handleCurrentChange(data,el){
          this.$emit('UserId',data.UserID)
        }
      }
    }
  </script>

  <style lang="scss" scoped>
  /deep/ .el-table__body tr.current-row > td {
    background-color: #50bfff;
  }
  </style>